package xyz.xtt.equity.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户权益变动记录表
 * </p>
 *
 * @author dale
 * @since 2025-02-10
 */
@Data
@Builder
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("tbl_user_benefit_change_record")
@ApiModel(value = "TblUserBenefitChangeRecord对象", description = "用户权益变动记录表")
public class TblUserBenefitChangeRecord implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId("record_id")
	@ApiModelProperty("主键")
	private Long recordId;

	@ApiModelProperty("批次id，一次业务操作可能涉及多个权益记录的变动")
	private Long batchId;

	@ApiModelProperty("通通app用户id")
	private Long appUserId;

	@ApiModelProperty("用户权益记录表id")
	private Long userBenefitId;

	@ApiModelProperty("变动类型： 1-获取权益 2-消耗权益 3-权益释放")
	private Integer changeType;

	@ApiModelProperty("变动数量")
	private Integer changeAmount;

	@ApiModelProperty("记录变动前的权益数量")
	private Integer beforeChange;

	@ApiModelProperty("变动后的权益数量")
	private Integer afterChange;

	@ApiModelProperty("权益数量变动来源动作")
	private String operateDesc;

	@ApiModelProperty("权益数量变动来源业务id，用于部分场景下权益释放")
	private Long operateBusinessId;

	@ApiModelProperty("创建时间")
	private LocalDateTime createTime;

	@ApiModelProperty("更细时间")
	private LocalDateTime updateTime;

	@ApiModelProperty("逻辑删除标识  0-未删除 1-已删除")
	private Integer isDel;
}
